package com.leung.exception;


import cn.dev33.satoken.exception.NotLoginException;
import cn.dev33.satoken.util.SaResult;

import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * @author 丨一
 * @version 1.0
 * @title GlobalExceptionHandler
 * @description:
 * @date 2025/7/29 下午3:13
 */

@RestControllerAdvice
public class GlobalExceptionHandler {

    @ExceptionHandler(NotLoginException.class)
    public SaResult handleNotLoginException(NotLoginException ex) {
        return SaResult.error("未登录");
    }

}
